package com.upcode.weighing.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.upcode.weighing.domain.DetectRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.upcode.weighing.vo.req.DetectRecordQueryParam;
import com.upcode.weighing.vo.req.DetectStatsQueryParam;
import com.upcode.weighing.vo.DetectOverTypeStats;
import com.upcode.weighing.vo.resp.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author alex
 * @since 2024-07-21
 */
public interface DetectRecordMapper extends BaseMapper<DetectRecord> {
    IPage<DetectRecordRespVo> selectPageList(@Param("page") Page page, @Param("vo") DetectRecordQueryParam params);
    IPage<DetectRecordRespVo> selectOverPageList(@Param("page") Page page, @Param("vo") DetectRecordQueryParam params);
    List<DetectRecordRespVo> queryTopN(Integer num);

    List<DetectOverTypeStats> queryOverTypeStats(@Param("vo")  DetectStatsQueryParam params);

    List<VehicleTypeStats> queryVehTypeStats(@Param("vo") DetectStatsQueryParam vo);

    List<TendencyStats> queryTendencyStats(@Param("vo") DetectStatsQueryParam vo);

    List<TendencyStats> queryTendencyStats2(@Param("vo") DetectStatsQueryParam vo);

    List<OverRangeStats> queryOverRangeStats(@Param("vo") DetectStatsQueryParam vo);

    List<BelongAddrStats> queryBelongAddrStats(@Param("vo") DetectStatsQueryParam vo);

    List<DetectPointDetectStats> queryDetectPointStats(@Param("vo") DetectStatsQueryParam vo);

    List<PointStatsVo> queryPointStats(@Param("vo") DetectStatsQueryParam vo);

    Long queryDetectTotal(@Param("vo") DetectStatsQueryParam vo);
    Long queryOverTotal(@Param("vo") DetectStatsQueryParam vo);
}
